package com.lc.luzhengtang.adapter;

import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lc.luzhengtang.R;
import com.lc.luzhengtang.conn.Conn;
import com.zcx.helper.scale.ScaleScreenHelperFactory;

import java.util.List;

/**
 * 文 件 名: NewsListAdapter
 * 创 建 人: zhangyu
 * 创建日期: 16/12/24 19:55
 * 邮   箱: yuanchong121@gmail.com
 * 修改时间：
 * 修改备注：
 */
public class CommentChangeAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    public CommentChangeAdapter(List<String> data) {

        super(R.layout.item_pic, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, String item) {
        ScaleScreenHelperFactory.getInstance().loadView((ViewGroup) helper.convertView);
        Glide.with(mContext).load(Conn.HOST2 + item).crossFade().error(R.mipmap.zhanwei).placeholder(R.mipmap.zhanwei).into((ImageView) (ImageView) helper.getView(R.id.img_glide));
        int position = helper.getPosition();
      /*  if (position % 2 == 1) {
            ScaleScreenHelperFactory.getInstance().loadViewMargin(helper.convertView.findViewById(R.id.ll_content), 10, 0, 10, 0);
        } else {
            ScaleScreenHelperFactory.getInstance().loadViewMargin(helper.convertView.findViewById(R.id.ll_content), 10, 0, 10, 0);
        }*/
    }

}
